package com.jsgt.greekfire.common.http

import com.jsgt.greekfire.bean.BroadcastTransactionBean
import com.jsgt.greekfire.bean.DelegateAccountBean
import com.jsgt.greekfire.bean.EntrustBean
import com.jsgt.greekfire.bean.UndelegateAccountBean
import okhttp3.RequestBody
import retrofit2.http.*

interface EntrustService {
    /**
     * 委托列表
     */
    @GET("delegateList")
    suspend fun getDelegateList(@Query("visible") visible: String): ResponseData<List<EntrustBean>>
    /**
     * 委托挖矿
     */
    @POST("delegateaccount")
    suspend fun delegateaccount(@Body params: RequestBody): DelegateAccountBean
    /**
     * 广播签名后的交易
     */
    @POST("broadcasttransaction")
    suspend fun broadcasttransaction(@Body params: RequestBody): BroadcastTransactionBean
    /**
     * 取消委托
     */
    @POST("undelegateaccount")
    suspend fun undelegateaccount(@Body params: RequestBody): UndelegateAccountBean
}